package com.wwwarehouse.usercenter.fragment.register;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.wwwarehouse.usercenter.R;
import com.wwwarehouse.usercenter.common.UserCenterCommon;


/**
 * @创建者 chenchao.
 * @创建时间 2017/8/15 14:18
 * @描述 ${TODO}
 */
public class ImproveInformationFragment extends RegisterCardBaseFragment implements View.OnClickListener {

    private View mRootView;
    private TextView mTvNum;
    private TextView mTvMailbox;
    private Button mBtSubmit;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        mRootView = inflater.inflate(R.layout.fragment_improve_information, container, false);
        return mRootView;
    }

    @Override
    public void setTitle() {
        if (peekFragment() instanceof ImproveInformationFragment) {
            mActivity.setTitle(R.string.maseage);
        }
    }

    @Override
    public void requestDatas() {
        mTvNum = findView(mRootView, R.id.tv_num);
        mTvMailbox = findView(mRootView, R.id.tv_mailbox);
        mTvNum.setText(UserCenterCommon.getInstance().getMobile());
        mTvMailbox.setText(UserCenterCommon.getInstance().getEmail());
        mBtSubmit = findView(mRootView, R.id.bt_submit);
        mBtSubmit.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        int i = v.getId();
        if (i == R.id.bt_submit) {
            popFragment();

        }
    }
}
